﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LKL_Code.MotionControlCard
{
    /// <summary>
    /// 插补接口
    /// </summary>
    public interface IInterpolation
    {
        /// <summary>
        /// 插补状态
        /// </summary>
         Interpolation_Status Status { get; }

        /// <summary>
        /// 暂停方式
        /// </summary>
         int PauseType { get; set; }

        /// <summary>
        /// 插补运动是否完成 Flase or True
        /// </summary>
         AxisMoveStatus MoveStatus { get; }

        /// <summary>
        /// 插补速度
        /// </summary>
         float Speed { get; set; }

        /// <summary>
        /// 插补加速度
        /// </summary>
         float Accel { get; set; }

        /// <summary>
        /// 插补减速度
        /// </summary>
        float Decel { get; set; }

        /// <summary>
        /// 连续插补开关
        /// </summary>
         bool EnableMerge { get; set; }

        /// <summary>
        /// 执行直线插补
        /// </summary>
        /// <param name="distanceList"></param>
        void MoveAbs(List<double[]> distanceList);

         void WaitMoveAbsOver();

        /// <summary>
        /// 插补急停
        /// </summary>
        void EmergentStop();

        /// <summary>
        /// 解除插补急停
        /// </summary>
        void ResetEmergentStop();

        /// <summary>
        /// 插补暂停
        /// </summary>
        void Pause();

        /// <summary>
        /// 从插补暂停中恢复
        /// </summary>
        void Resume();

    }


    /// <summary>
    /// 插补状态
    /// </summary>
    public struct Interpolation_Status
    {
        /// <summary>
        /// 暂停中
        /// </summary>
        public bool IsPause { get; internal set; }

        /// <summary>
        /// 急停中
        /// </summary>
        public bool IsEmergentStop { get; internal set; }
    }
}
